`POST /v1/auth/magic/mint` — internal endpoint the bot calls when a user runs `/web`. Authenticates via `x-internal-secret` (constant-time compare against `BOT_INTERNAL_SECRET`). Inserts a fresh nonce row and returns it. No JWT is issued here — that happens on consume.
Failure modes:
- 401 if the header is missing or wrong.
- 400 if the body fails to parse.
- 500 if the DB insert fails.
POST
`POST /v1/auth/magic/mint` — internal endpoint the bot calls when a user
runs `/web`. Authenticates via `x-internal-secret` (constant-time
compare against `BOT_INTERNAL_SECRET`). Inserts a fresh nonce row and
returns it. No JWT is issued here — that happens on consume.
Previous
`POST /v1/auth/telegram` — exchange a verified Telegram Login Widget
payload for a 7-day session JWT. Unauthenticated; the HMAC over the
payload (signed with SHA256(BOT_TOKEN)) is the credential.
Next
`POST /v1/auth/magic/mint` — internal endpoint the bot calls when a user
runs `/web`. Authenticates via `x-internal-secret` (constant-time
compare against `BOT_INTERNAL_SECRET`). Inserts a fresh nonce row and
returns it. No JWT is issued here — that happens on consume.